include('shared.lua')

ENT.RenderGroup = RENDERGROUP_OPAQUE

function ENT:Draw()
	self.Entity:DrawModel()
end 

function ENT:Initialize()
	self:NextThink( CurTime() + 0.5 )
end

function ENT:Think()
	self.SITP_MyHealth = self:GetNetworkedInt( "maxhealth" )
	if(!self.VisModel) then
		self.VisModel = self:GetNetworkedEntity( "vismodel" )
	else
		if(self.VisModel:IsValid()) then
			local scaled = Vector(1, 1, 1) * (1 + 0.5 * self.SITP_MyHealth / 100)
			self.VisModel:SetModelScale( scaled )
		else
			self.VisModel = self:GetNetworkedEntity( "vismodel" )
		end
	end
	self:NextThink( CurTime() + 0.3 )
end